<php>
$partner_id = $_SESSION['qp_id'];
$_REQUEST['goPageFun'] = "couponGoPage";
if(!empty($_REQUEST['pid'])){
	$isbelongp = D('Partner','Admin')->isBelongPartner($_REQUEST['pid'],$_SESSION['qp_parent_id']);
	if($isbelongp)$partner_id = $_REQUEST['pid'];//$partner_id;
}
		
$pdata = D('Partner','Admin')->selectPartnerInfo(array('porppid'=>$partner_id,'psort'=>$map['psort']),'id',null,null);
$ary_pids = getSubByKey($pdata,"id");
$couponpagedata = model('Coupon')->search4SH(array('pid'=>$ary_pids,'gid'=>$_REQUEST['gid'],'passcode'=>$_REQUEST['checkedpcode']) ,'check_time desc', 5);
		
</php>			
			
			<div class="list">
  				<table id="goods_list" width="100%" border="0" cellspacing="0" cellpadding="0">
  					<tr>
  						
				    	<th style="text-align:center;">{:K('SP_COUPON_NM')}码</th>
				    	<th class="line_l" style="text-align:center;">商品</th>
				    	<th class="line_l" style="text-align:center;">数量</th>
				    	<th class="line_l" style="text-align:center;">兑换地点</th>
				    	<th class="line_l" style="text-align:center;">兑换时间</th>
				    	<th class="line_l" style="text-align:center;">状态</th>
				  	</tr>
  					<volist id="vo" name="couponpagedata['data']">
				    	<tr overstyle='on' id="goods_{$vo.passcode}">
				        	<td style="text-align:center;">{$vo.passcode}</td>
				        	<td style="text-align:center;">
					        	{:getGoodsTitle($vo['goods_id'],'')}
				        	</td>
				        	<td style="text-align:center;">{$vo.quantity}</td>

				        	<td style="text-align:center;">
					        	{:getParnterTitle($vo['checker_id'],'')}
				        	</td>
				        	<td style="text-align:center;">{:paramMillisecond2Date($vo['check_time'],'Y-m-d H:i:s')}</td>
				        	<td style="text-align:center;">
				        		<php>if($vo['is_canceled']=='N'){</php>
				        			<img src="/Public/Images/global/icon_status_Y.png" title="{:K('SP_COUPON_NM')}状态正常！">
					        	<php>}</php>
					        	<php>if($vo['is_canceled']=='Y'){</php>
					        		<img src="/Public/Images/global/icon_status_N.png" title="{:K('SP_COUPON_NM')}已取消！原因：{$vo['cancel_reason']}！">
					        	<php>}</php>
				        	</td>
				      </tr>
				  	</volist>
  				</table>
  			</div>
  			
  			<php>if(empty($couponpagedata)||empty($couponpagedata['data'])){</php>
				<php>$alert_message="无已验证的{:K('SP_COUPON_NM')}！";</php>
				<include file="../Public/alert_box.html" />
  			<php>}</php>
  			
		  	<div style="padding: 20px 0;text-align:center;">
		    	<div class="page_box">{$couponpagedata['html']}</div>
		  	</div>